 <!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var a = -10;
//			取绝对值 Math.abs();
//			alert(Math.abs(a));
			
//			Math.floor 向下取整
			var num1 = 1.9;
//			alert(Math.floor(num1));
			var num2 = -1.9;
//			alert(Math.floor(num2));
			
			
//			Math.ceil();向上取整
			var num1 = 1.1;
//			alert(Math.ceil(num1));
			
			var num1 = -1.1;
//			alert(Math.ceil(num1));
			
//			Math.round();四舍五入
			var num1 = 1.49;
//			alert(Math.round(num1));
			
			var num1 = -1.6;
			alert(Math.round(num1));
			
			
//			Math.random()随机数
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		</script>
	</body>
</html>
